#pragma once

#include "wsTypes.h"
using namespace whitesnake;

#define FILE_NAME_LENGTH 260	// 256+1+3

class wsFile
{
public:
	TCHAR name[FILE_NAME_LENGTH];
	int size;
	unsigned char* data;	

public:
	wsFile(TCHAR* fileName, int fileSize);
	~wsFile();
};

class wsCompress
{
public:
	// compress method.
	static void compressSample();

	// extract method.
	static bool extractToFile(const TCHAR* sourceFile, const TCHAR* targetDir = _T(".\\"));
	static wsFile* extractToMemory(const TCHAR* sourceFile, const TCHAR* itemName);

	static void openFromResource(const int resourceID);
	static wsFile* getResourceItem(const TCHAR* itemName);
	static void closeFromResource();

private:
	wsCompress();
	~wsCompress();
};

